<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '模板1文章发布';
?>
<div class="cw-tpl1-article-index">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a('发布', ['create'], ['class' => 'btn btn-success']) ?>
        <a href="#" class="btn btn-primary" data-toggle="modal" data-target="#tpl1">模板布局</a>
    </p>
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'ta1_id',
            'ta1_title',
            'ta1_pic_url:url',
            //'ta1_content:ntext',
            //'ta1_json:ntext',
             'ta1_time',

            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>
</div>
<!-- Modal -->
<div class="modal fade" id="tpl1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">模板1布局</h4>
      </div>
        <div class="modal-body" style="height: 500px;">
            <div style="width: 100%;height: 150px; background-color: #999">Picture</div>
            <div>
                <div style="width: 40%;">
                    <ul style="width: 100%;list-style: none;float: left">
                        <li style="width: 100%;height: 30px;background-color: #0099ff">Link</li>
                        <li style="width: 100%;height: 30px;background-color: #3366ff">Link</li>
                        <li style="width: 100%;height: 30px;background-color: #6699ff">Link</li>
                        <li style="width: 100%;height: 30px;background-color: #9999ff">Link</li>
                        <li style="width: 100%;height: 30px;background-color: #ccccff">Link</li>
                    </ul>
                </div>
                <div style="width: 50%; height: 300px; background-color: #cc99ff; float: left">Content</div>
            </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>
<script>
    document.getElementById('cw-tpl').setAttribute('class',"active");
</script>
